<?php

/**
 * Created by PhpStorm.
 * User: yangxy
 * Date: 2016/5/27
 * Time: 13:38
 */

//---common--

//返回状态值
const RESPONSE_FAILURE =0;              //失败
const RESPONSE_SUCCESS =1;              //正常
const RESPONSE_ARGUMENT_INVALID =2;   //参数错误
const RESPONSE_SERVER_ERROR =3;        //服务器错误

//验证状态auth_failure
const AUTH_FAILURE_NO =0;               //失败
const AUTH_FAILURE_YES =1;              //正常

//消息编码
const MESSAGECODE_APIKEY_EXPIRED =1001;        //APIKEY过期
const MESSAGECODE_TOKEN_FAILURE =1002;         //TOKEN验证失败
const MESSAGECODE_TIMESTAMP_EXPIRED =1003;    //TIMESTAMP过期
const MESSAGECODE_USER_NOT_BIND_PHONE = 1004; //用户未绑定手机号码

//验证码类型
const SMS_CODE_TYPE_REGISTER = 1;
const SMS_CODE_TYPE_RESET_PWD = 2;
const SMS_CODE_TYPE_LOGIN = 3;
const SMS_CODE_TYPE_BIND_MOBILE = 4;

const YES = true;   //TRUE
const NO = false;   //FALSE

//----project--------------

const OFFLINEPAY = 1;       //线下支付
const ALIPAY = 3;           //支付宝支付

//const PINTUAN_ING = 0;          //拼团中
//const PINTUAN_SELL_OUT = 1;     //售罄

//店铺状态
const STORE_STATE_CLOSED = 0;
const STORE_STATE_OPENING = 1;

//商品状态
const GOODS_IF_SHOW_YES = 1;    //上架
const GOODS_IF_SHOW_NO = 0;     //已下架
const GOODS_CLOSED_YES = 1;     //禁售
const GOODS_CLOSED_NO = 0;     //可售

/* 土特产订单状态 */
const ORDER_SUBMITTED = 10;    // 针对货到付款而言，他的下一个状态是卖家已发货
const ORDER_PENDING = 11;        // 等待买家付款
const ORDER_ACCEPTED = 20;    // 买家已付款，等待卖家发货
const ORDER_REFUNDING = 21;   // 处于退款流程中
const ORDER_SHIPPED = 30;    // 卖家已发货
const ORDER_FINISHED = 40;    // 交易成功
const ORDER_REFUND = 50;    // 退款成功
const ORDER_CANCELED = 0;    // 交易已取消
const ORDER_DELETED = -1;		//订单删除
/*土特产订单退款单状态*/
const REFUND_PENDING = 10;    // 等待卖家审核
const REFUND_ACCEPTED = 20;    // 卖家已审核，等待买家发货
const REFUND_SHIPPED = 30;    // 买家已发货
const REFUND_REFUNDING = 40;    // 退款中
const REFUND_ARGEE = 24;      // 卖家同意退款
const REFUND_FINISHED = 50;    // 退款成功
const REFUND_CANCELED = 0;    // 退款已取消

/* 旅游路线订单状态 */
const TOUR_ORDER_SUBMITTED = 10;    // 针对拼团已付款，他的下一个状态是等待出行
const TOUR_ORDER_PENDING = 11;        // 等待买家付款
const TOUR_ORDER_ACCEPTED = 20;    // 买家已付款，等待出行
const TOUR_ORDER_REFUNDING = 21;   // 处于退款流程中
const TOUR_ORDER_AGREE = 24;   // 合伙人同意退款 等待平台导出退款单退款
//const TOUR_ORDER_SHIPPED = 30;    // 卖家已发货
const TOUR_ORDER_FINISHED = 40;    // 交易成功
const TOUR_ORDER_REFUND = 50;    // 退款成功
const TOUR_ORDER_CANCELED = 0;    // 交易已取消
const TOUR_ORDER_DELETED = -1;		//订单删除

//旅游路线退款状态
const TOUR_REFUND_PENDING = 10;    // 等待卖家审核
const TOUR_REFUND_REFUSED = 11;    // 退款申请被拒绝
//const TOUR_REFUND_ACCEPTED = 20;   // 卖家已审核，等待买家发货
//const TOUR_REFUND_SHIPPED = 30;    // 买家已发货
const TOUR_REFUND_REFUNDING = 40;  // 退款中
const TOUR_REFUND_FINISHED = 50;   // 退款成功
const TOUR_REFUND_CANCELED = 0;    // 退款已取消

/*---做地主订单状态---*/
const LANDOWNERS_PENDING = 10;//等待卖家审核
const LANDOWNERS_REFUND_AGREE = 24;//同意退款
const LANDOWNERS_ORDRE_FINISHED = 40;//交易完成
const LANDOWNERS_ORDRE_CANCELED = 0;//交易取消
const LANDOWNERS_ORDRE_REFUND = 50;//退款成功
const LANDOWNERS_ORDRE_SHIPPED = 30;//已发货，待收货
const LANDOWNERS_ORDER_PENDING = 11;//待付款
const LANDOWNERS_ORDER_ACCEPTED = 20;//已付款，待发货
const LANDOWNERS_ORDER_DELETED = -1;//订单删除
const LANDOWNERS_ORDER_REFUNDING = 21;//处于退款流程
const LANDOWNERS_REFUND_REFUNDING = 40;//退款中
const LANDOWNERS_REFUND_CANCELED = 0;//退款已取消
const LANDOWNERS_REFUND_PENDING = 10;//申请退款等待卖家审核

/* 订单商品 退款状态 */
const REFUND_TYPE_REFUND = 1;   //退款
const REFUND_TYPE_RETURN_GOODS = 2;   //退货

const ORDER_DELETE_NOTE = 1;		// 删除标志位

//订单来源
const ORDER_FROM_APP = 0;//app
const ORDER_FROM_WAP = 1;//wap
const ORDER_FROM_PC = 2;//pc

const EVALUATE_WAIT = 0;   //等待评价
const EVALUATE_YES = 1;     //已评价

const COMPLAIN_WAIT = 0;   //未投诉
const COMPLAIN_YES = 1;     //已投诉

const TOUR_ORDER_EXTENSION_NORMAL = 'normal';
const TOUR_ORDER_EXTENSION_GROUPBUY = 'groupbuy';

//路线出行人类型
const TOUR_JOIN_ALL = 0;//全部
const TOUR_JOIN_ADULT_ONLY = 1;//只允许大人
const TOUR_JOIN_CHILD_ONLY = 2;//只允许小孩

//线路出行团类型
const TOUR_TUAN_TYPE_PUBLIC = 0;//公开
const TOUR_TUAN_TYPE_PRIVATE = 1;//私有

//团状态
const TUAN_STATE_DEFAULT = -1;    //刚创建团，未支付
const TUAN_STATE_WAITE = 0;       //组团中
const TUAN_STATE_SUCCESS = 1;     //组团成功
const TUAN_STATE_FAILURE = 2;     //组团失败

//参团状态
const TUAN_DATA_STATE_DEFAULT = 0;    //刚参团，未支付
const TUAN_DATA_STATE_SUCCESS = 1;    //参团成功
const TUAN_DATA_STATE_FAILURE = 2;    //参团失败

//用户类型
const USER_TYPE_ADMIN = 0;//平台管理员用户类型
const USER_TYPE_STORE_ADMIN = 1;//店铺管理员用户类型
const USER_TYPE_JOINER_ADMIN = 2;//加盟商用户类型
const USER_TYPE_CONSUMER = 3; //会员消费者用户类型

//配置项code
const CONFIG_CODE_site_name = 'site_name';
const CONFIG_CODE_site_title = 'site_title';
const CONFIG_CODE_site_keywords = 'site_keywords';
const CONFIG_CODE_icp_number = 'icp_number';
const CONFIG_CODE_copyright = 'copyright';
const CONFIG_CODE_site_status = 'site_status';
const CONFIG_CODE_closed_reason = 'closed_reason';
const CONFIG_CODE_hot_search = 'hot_search';
const CONFIG_CODE_tuan_info_endtime = 'tuan_info_endtime';
const CONFIG_CODE_tour_refund_singlebuy = 'tour_refund_singlebuy';
const CONFIG_CODE_tour_refund_groupbuy_before = 'tour_refund_groupbuy_before';
const CONFIG_CODE_tour_refund_groupbuy_after = 'tour_refund_groupbuy_after';
const CONFIG_CODE_tour_refund_deadline = 'tour_refund_deadline';
const CONFIG_CODE_order_info_live_time_goods = 'order_info_live_time_goods';
const CONFIG_CODE_order_info_live_time_tour = 'order_info_live_time_tour';
//end
